const http = require('http');
// const url = require('url');
// const querystring = require('querystring');
const options = {
    hostname: 'localhost',
    port: 8080,
    method: 'POST',
    headers: {
        'Content-Type': 'application/x-www-form-urlencoded'
    }
}

const request = http.request(options, (response) => {
    console.log(response.headers)
    response.on('data', data => {
        console.log(data.toString())
    })
    response.on('end', () => {
        // console.log(data)
    })
})

request.write('lll');
request.end();

// console.log(querystring.parse('foo=bar&baz=qux&baz=quux&corge'))
